package com.woniu.gf.pawn.comm.core.exception;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @BelongsProject: gf-pawn-comm
 * @BelongsPackage: com.woniu.gf.pawn.comm.core.exception
 * @Author: wu wei
 * @CreateTime: 2020-10-08 18:53
 * @Description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PawnException extends RuntimeException {
    private Integer code;
    public PawnException(Integer code,String msg){
        super(msg);
        this.code=code;
    }
    public PawnException(PawnExceptionCode pawnExceptionCode){
        super(pawnExceptionCode.getMsg());
        this.code=pawnExceptionCode.getCode();
    }
}
